import 'package:flutter/cupertino.dart';
import 'package:xiongan_app_yy/common/user_singleton.dart';
import 'package:xiongan_app_yy/net/internet.dart';
import 'package:xiongan_app_yy/utils/toast_utils.dart';

class IntoHandoverDetailsInfoProvider extends ChangeNotifier {
  bool _netStatus1 = false;
  List _listData = List(); //列表数据
  get netStatus1 => _netStatus1;

  get listData => _listData;

  void getList(String id) async {
    Map<String, dynamic> sendObj = {
      "warehouseid": DataSingleton().warehouseChoice.id,
      "orderid": id,
      "pageNo":-1
    };
    _netStatus1 = true;
    _listData = [];
    notifyListeners();
    // print(DataSingleton().warehouseChoice.id);
    Map<String, dynamic> res = await Internet()
        .get("WMS/MiWarehouseInOrder/GetHandoverMaterialList", params: sendObj);
    if (res['flag'] == "success") {
      _listData = res['datas'];
    }else{
      TostUtil.showToast(res['msg']);
    }
    _netStatus1 = false;
    notifyListeners();
  }
}
